package com.woniu.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniu.entity.RelUesrGroup;
import com.woniu.service.RelUesrGroupService;
import com.woniu.mapper.RelUesrGroupMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author nanqiao
* @description 针对表【rel_uesr_group】的数据库操作Service实现
* @createDate 2025-06-13 14:30:17
*/
@Service
public class RelUesrGroupServiceImpl extends ServiceImpl<RelUesrGroupMapper, RelUesrGroup>
    implements RelUesrGroupService{
    @Autowired
    private RelUesrGroupMapper relUesrGroupMapper;
    @Override
    public void saveBatch(List<RelUesrGroup> list) {
        this.saveBatch(list, 1000); // 每批插入数量可调优
    }
    @Override
    public List<RelUesrGroup> getRelUesrGroupsByGroupId(Integer groupId) {
        return relUesrGroupMapper.selectByGroupId(groupId);
    }
    @Override
    public List<RelUesrGroup> getRelUesrGroupsByGroupIds(List<Integer> groupIds) {
        return relUesrGroupMapper.getRelUesrGroupsByGroupIds(groupIds);
    }
    @Override
    public List<RelUesrGroup> getRelUesrGroupsByUserIds(List<Integer> userIds) {
        return relUesrGroupMapper.selectByUserIds(userIds);
    }
}




